from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic

import django_comments.models
import django_comments.config as config

def content_types(request):
    model_types = [ContentType.objects.get_for_model(django_comments.models.Comment)]
    final_dict = {}
    for model_type in model_types:
        final_dict[model_type.model + '_content_type'] = model_type.id
        final_dict[model_type.model + '_model'] = model_type.model
    return final_dict

def comment_config(request):
    return {'COMMENT_HIDE_THRESHOLD' : getattr(config, 'COMMENT_HIDE_THRESHOLD', -1)}